	<%@ page import="java.sql.*,studentportal.*"%>
<%
		response.setContentType("text/xml");
			Connection con1=MySQLDriver.getConnection(); 
			Statement st1=con1.createStatement();
			System.out.println("========select subject_id, subject_name from  subject_master where semister_id='"+request.getParameter("ID")+"'");
			ResultSet rs=st1.executeQuery("select subject_id, subject_name from  subject_master where semister_id='"+request.getParameter("ID")+"'  and subject_id not in (select subject_id from faculty_assign_master)");
		String xmlContent="";
		xmlContent+="<?xml version=\"1.0\"?>\n";
		xmlContent+="<!DOCTYPE SUBCATEGORYLIST [\n";
		xmlContent+="<!ELEMENT SUBCATEGORYLIST (SUBCATEGORY)*>\n";
		xmlContent+="<!ELEMENT SUBCATEGORY (ID, TEXT)>\n";
		xmlContent+="<!ELEMENT ID (#PCDATA)>\n";
		xmlContent+="<!ELEMENT TEXT (#PCDATA)>\n";
		xmlContent+="]>\n";
		xmlContent+="<SUBCATEGORYLIST>\n";
		while(rs.next()) {
			xmlContent+="<SUBCATEGORY>\n";
			xmlContent+="<ID>"+rs.getString(1)+"</ID>\n";
			xmlContent+="<TEXT>"+rs.getString(2)+"</TEXT>\n";
			xmlContent+="</SUBCATEGORY>\n";
		}
		xmlContent+="</SUBCATEGORYLIST>\n";
		System.out.println(xmlContent);
		response.getWriter().write(xmlContent);
				rs.close();
		st1.close();
		con1.close();
		
  %>
